﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style type="text/css">
        .auto-style1 {
            height: 20px;
            width: 330px;
        }
        .auto-style2 {
            height: 20px;
            width: 173px;
        }
        </style>
    <script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script>
    <script type="text/javascript">
        function checkUserName() {
            var username = $("#txtName").val();
            var userpwd = $("#txtPwd").val();
            $get("CheckUserName.aspx?username=" + username + "&userpwd=" + userpwd, null, callback);
        }
        function callback(data)
        {
            $("#message").html(data);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                   <table style="width:43%; margin-right: 0px;">
            <tr>
                <td class="auto-style2">用户名:</td>
                <td class="auto-style1">
                    <asp:TextBox ID="txtName" runat="server" value=""></asp:TextBox>
                </td>

            </tr>
            <tr>
                <td class="auto-style2">密码:</td>
                <td class="auto-style1">
                    <asp:TextBox ID="txtPwd" runat="server" value=""></asp:TextBox>
                </td>

            </tr> 
        </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    
 
                    <input id="btnLogin" type="button" value="登录"  onblur="checkUserName()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input id="btnCancel" type="button" value="取消" />   
    </div>
        <div id="message"></div>
    </form>
</body>
</html>
